extends BaseDlg

onready var faci_tab = $bg/MarginContainer/TabContainer
var offest_size = Vector2(40,-15)

func setTile(val):
	tile.text = val

func _on_closeBtn_pressed():
	del()

func txt(txt):
	$txt.bbcode_text = txt

func _on_baseDlg_about_to_show():
	var wins = get_viewport_rect().size
	var sfs = get_size()
	var newpos = Vector2(wins.x * 0.5,(wins.y-sfs.y)*0.5) + offest_size
	set_position(newpos)
	pass

func set_tabs(names):
	var a = 0
	for n in names:
		faci_tab.set_tab_title(a,n)
		a += 1

func get_faci_gd(num=0):
	var gd_list = faci_tab.get_child(num)
	return gd_list.get_node("GridContainer")
